<script setup lang="ts">
import type { ShareInfo } from '@/types/Playing'
const props = defineProps<{
  shareInfos:ShareInfo[]
}>()
const emit = defineEmits(['onItem'])
</script>

<template>

  <div class="content">
    <div class="title">
      分享至
    </div>
    <div class="list">
      <div class="item" v-for="item in props.shareInfos" :key="item.id" @click="emit('onItem',item)">
          <div class="img iconfont" :class="item.icon"></div>
          <div class="txt">{{ item.name }}</div>
      </div>
    </div>
  </div>

</template>

<style lang="scss" scoped>

.content {
  background-color: #333;
  width: 100%;
  height: 100%;
  border-top-right-radius: 2vw;
  border-top-left-radius: 2vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.title {
  padding-top: 8vw;
  padding-left: 4vw;
  color: #fff;
  font-size: 4vw;
  background-color: transparent;
}
.list{
  flex: 1;
  background-color: transparent;
  padding-top: 3vw;
  padding-left: 4vw;
  padding-right: 4vw;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  column-gap: 4vw;
}
.item {
  width: 20vw;
  height: 24vw;
  background-color: #333;
  margin-bottom: 3vw;
}
.img {
  width: 16vw;
  border-radius: 10vw;
  height: 16vw;
  margin-left: 2vw;
  background-color: #666;
  font-size: 10vw;
  line-height: 16vw;
  text-align: center;
}
.txt {
  color: #666;
  font-size: 3vw;
  text-align: center;
  background-color: transparent;
  margin-top: 2vw;
}
</style>